﻿<UserControl x:Class="CoolCodePFM.TranList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:cc="clr-namespace:CoolCode.Controls;assembly=CoolCode.Controls">
    <Grid x:Name="LayoutRoot" Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Border Grid.Row="0" BorderBrush="#99bbe8" BorderThickness="1,1,1,0" Height="28">
            <Border.Background>
                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <GradientStop Color="#dae6f4" Offset="0"/>
                    <GradientStop Color="#cfdeef" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel x:Name="opPanal" Opacity="0.7" Orientation="Horizontal" >
                <Image Source="../Images/do_add.png" Cursor="Hand" Stretch="None" Margin="3" MouseLeftButtonUp="OnCreate"/>
                <TextBlock Text="Create" FontSize="12" Cursor="Hand" VerticalAlignment="Center" Margin="1" MouseLeftButtonUp="OnCreate"/>
                <Image Source="../Images/do_split.png" Stretch="None" Margin="3"/>
                <Image Source="../Images/do_modify.png" Cursor="Hand" Stretch="None" Margin="3" MouseLeftButtonUp="OnUpdate"/>
                <TextBlock Text="Update" FontSize="12" Cursor="Hand" VerticalAlignment="Center" Margin="1" MouseLeftButtonUp="OnUpdate"/>
                <Image Source="../Images/do_split.png" Stretch="None" Margin="3"/>
                <Image Source="../Images/do_delete.png"  Cursor="Hand" Stretch="None" Margin="3" MouseLeftButtonUp="OnDelete"/>
                <TextBlock Text="Delete" FontSize="12" Cursor="Hand" VerticalAlignment="Center" Margin="1" MouseLeftButtonUp="OnDelete"/>
                <Image Source="../Images/do_split.png" Stretch="None" Margin="3"/>
                <Image Source="../Images/do_refresh.png"  Cursor="Hand" Stretch="None" Margin="3" MouseLeftButtonUp="OnRefresh"/>
                <TextBlock Text="Refresh" FontSize="12" Cursor="Hand" VerticalAlignment="Center" Margin="1" MouseLeftButtonUp="OnRefresh"/>
            </StackPanel>
        </Border>
        <Border Grid.Row="1" BorderBrush="#99bbe8" BorderThickness="1,1,1,1">
            <data:DataGrid x:Name="grdTranList" BorderThickness="0" AutoGenerateColumns="False" >
                <data:DataGrid.Columns>
                    <!--<data:DataGridCheckBoxColumn Header=" " Binding="{Binding Checked}" />-->
                    <data:DataGridTextColumn Header="Id" IsReadOnly="True" Binding="{Binding Guid}" Width="100" />
                    <data:DataGridTextColumn Header="Date" IsReadOnly="True" Binding="{Binding Date}" Width="100"/>
                    <data:DataGridTextColumn Header="Price" IsReadOnly="True" Binding="{Binding NewPrice}" Width="100"/>
                    <data:DataGridTextColumn Header="Category" IsReadOnly="True" Binding="{Binding Item.Type}" Width="100"/>
                    <data:DataGridTextColumn Header="Description" IsReadOnly="True" Binding="{Binding Item.Description}" Width="300"/>
                </data:DataGrid.Columns>
            </data:DataGrid>
        </Border>
        <Border Grid.Row="2" BorderBrush="#99bbe8" BorderThickness="1,0,1,1" Height="30">
            <Border.Background>
                <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <GradientStop Color="#dae6f4" Offset="0"/>
                    <GradientStop Color="#ceddef" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
             <cc:VisualPager HorizontalAlignment="Left"  Margin="5"  x:Name="pager"/> 
        </Border>
        <Grid Grid.Row="3" Background="#dae6f4"></Grid>

    </Grid>
</UserControl>
